<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <style>


        *{
            margin: 0;
            padding: 0;
        }
        img{
            display: block;
            width: 100%;
            height: 100%;
            transition: all 1s;
        }


            .box:hover img{
                transform: translateX(30px);
                opacity: 0.5;
            }

        .box{
            width: 350px;
            height: 400px;
            border: 5px solid red;
            margin: 0 auto;
            position: relative;
            overflow: hidden;
        }
        .box h2{
            position: absolute;
            left: 50px;
            top: 10px;
            color: white;
            transition: all 1s 0.5s;

        }

        .box:hover h2{
            /* left: 100px; */
            transform: translateX(100px);
        }

        .box p{
            position: absolute;
            left: 50px;
            width: 100px;
            color: white;
            background: blue;
            transition: all  1s;

        }


        .box .p1{
            top: 100px;
            transform: translateY(400px); 
        }

        .box:hover .p1{
            transform: translateY(0px); 
    }


        .box .p2{
            top: 200px;
            transform: translateX(400px);
        }
        .box:hover .p2{
            /* top: 200px; */
            transform: translateX(0px);
        }
        .box .p3{
            top: 300px;
            transform: translateX(-400px);
        
        }
        .box:hover .p3{
            /* top: 300px; */
            transform: translateX(0px);
        }
       

    </style>

</head>
<body>
    
    <div class="box">
        <img src="./image/4.png" alt="">
        <h2>title</h2>
        <p class="p1">11111</p>
        <p class="p2">22222</p>
        <p class="p3">33333</p>

    </div>

</body>
</html>